/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BUS;


import DAO.NoiDung_DAO;
import DTO.NoiDung_DTO;
import java.sql.SQLException;
import java.util.ArrayList;

/**
 *
 * @author phihai
 */
public class NoiDung_BUS {
    public ArrayList<NoiDung_DTO> LayNoiDung(int IDTopic) throws Exception
    {
        NoiDung_DAO nd = new NoiDung_DAO();
        return nd.LayNoiDung(IDTopic);
    }
    
    public int XoaNoiDung(int id_noidung) throws Exception
    {
        NoiDung_DAO nd = new NoiDung_DAO();
        return nd.XoaNoiDung(id_noidung);
    }
    
    public void Themtin(int  IDchuyenmuc, String link, String title, byte[] img, String time, String content) throws SQLException
    {
        NoiDung_DAO nddao = new NoiDung_DAO();
        nddao.Themtin(IDchuyenmuc, link, title, img, time, content);
    }
}
